<?php
/*
 *
 */

namespace Common\Lib\Sms;

use Common\Lib\Sms\Providers\Alidayu;
use Common\Lib\Sms\Providers\Aliyun;

class Provider
{
    /**
     * 获取短信服务供应商
     * @param string $name
     * @param array  $options
     * @return ISmsSend|null
     */
    public static function make($name, $options)
    {
        switch ($name) {
            case 'alidayu':
                $provider = new Alidayu($options);
                break;
            case 'aliyun':
                $provider = new Aliyun($options);
                break;            
            default:
                $provider = null;
                break;
        }
        return $provider;
    }
}